package com.android.takagism.utils;

import java.util.HashMap;
import java.util.Map;

public class MyContext {
    private static MyContext instance;
    private Map<String,Object> statics;
    private Map<String,Object> allClues;

    public MyContext() {
        this.statics = new HashMap<>();
        this.allClues = new HashMap<>();
    }

    public Object getStatics(String key){
        return statics.get(key);
    }

    public void setStatics(String key, Object value) {
        statics.put(key, value);
    }
    public Object getAllClues(String key){
        return statics.get(key);
    }

    public void setAllClues(String key, Object value) {
        statics.put(key, value);
    }

    public static MyContext getInstance(){
        if (instance == null){
            synchronized (MyContext.class){
                if (instance == null) {
                    instance = new MyContext();
                }
            }
        }
        return instance;
    }

}
